TELDNLookupByIndex
Finds a directory number by index in a terminal's list of directory numbers.
pascal TELErr TELDNLookupByIndex ( TELHandle hTEL, short dnType, Boolean physical, short index, TELDNHandle *hTELDN);
hTEL
- A handle to a telephone record.
dnType
- A type of directory number. See "Directory Number Types" on page 3-6 for a description of the available directory number types.
physical
- A Boolean value that determines whether
TELDNLookupByIndex
considers all directory numbers (true
) or only those to which commands can be sent (false
).index
- An index in the list of directory numbers associated with the specified terminal. The value in this field must be between 1 and the number returned by the
TELCountDNs
function for corresponding values in thednType
andphysical
parameters.hTELDN
- On exit, a handle to a directory number structure for the directory number having the specified index. Your application is responsible for disposing of this handle when it's done using it.
- function result
- A result code.
DESCRIPTION
TheTELDNLookupByIndex
function returns, in the hTELDN parameter, a handle to a directory number structure for the directory number having the index specified by theindex
parameter in the list of directory numbers associated with the terminal specified by thehTEL
parameter. If no directory number can be found having that index,hTELDN
is set tonil
.You can restrict the search to a particular type of directory number by passing a suitable value in the
dnType
parameter. To search all directory numbers associated with the specified terminal, pass the valuetelAllDNs
. If thephysical
parameter istrue
,TELDNLookupByIndex
searches all directory numbers associated with that terminal, even those that are currently inaccessible (as indicated by thednAccessible
field of the directory number structure). Ifphysical
isfalse
,TELDNLookupByIndex
considers only those directory numbers that are currently accessible.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help